www.gusucode.com > 6KBBS ASP版 V7.1 > 6KBBS ASP版 V7.1\code\bbs\admin\AdminRight1.asp
<!--#include file="AdminConn.asp"--><!--#include file="../inc/fun.asp"--><!--#include file="../inc/md5.asp"--> <% dim action,strt,bad,b,lgname,lgpwd,lgpwdmd5,bd,rs1,bdinfo,name,sql,i,bdlist2,usedtable,daynum,listname,dely lgname=replace(session(prefix&"adlgname"),"'","''") lgpwd=replace(session(prefix&"adlgpwd"),"'","''") if isnull(lgname) or lgname="" or isnull(lgpwd) or lgpwd="" then response.redirect"admincheck.asp" else lgpwdmd5=md5(lgpwd) if conn.execute("select top 1 bd from admin where name='"&lgname&"' and password='"&lgpwdmd5&"' and bd=0").eof then response.redirect"admincheck.asp" end if end if sub bdlist(listname) set bdlist2=conn.execute("select * from bdinfo where followid<>0 order by followid,orders desc,id") response.write"<select size=1 name="&listname&" style='font-size: 9pt'><option value=0>所有论坛</option>" do while not bdlist2.eof response.write"<option value="&bdlist2("id")&">"&split(bdlist2("bdinfo"),"|")(0)&"</option>" bdlist2.movenext Loop response.write"</select>" set bdlist2=nothing end sub action=request.querystring("action") select case action case"editfl","updatefl" strt="编辑分类名称" case"editbd","editbdsave" strt="编辑版面资料" case"upfl" strt="提升分类" case"upbd" strt="提升版面" case"pass","addpassuser" strt="编辑认证用户" case"userdel","deluser","hyuser" strt="论坛用户删除与恢复" case"changepwd","newpwd" strt="修改用户密码" case"userset","setuserok" strt="用户特殊设置" case"vip","addvip","delvip" strt="VIP用户设置" case"deltopic","delday","deldaynore","delusertopic" strt="批量删除帖子" case"movetopic","moveday","moveuser" strt="批量移动帖子" case"adminpwd","editadminpwd" strt="修改管理员后台登陆密码" end select sub send(str) response.write"<table border=1 cellpadding=0 cellspacing=0 style='border-collapse: collapse' bordercolor=#F4F6FC width=100% bgcolor=#ffffff height=50><tr><td width=100% ><p style='margin:5px;line-height:150%'>"&str&"</p></td></tr></table>" end sub %> <link rel=stylesheet type=text/css href=pic/css.css> <STYLE type=text/css> BODY { SCROLLBAR-FACE-COLOR:#205CC1; FONT: 9pt 宋体; SCROLLBAR-HIGHLIGHT-COLOR: #799ae1; SCROLLBAR-SHADOW-COLOR: #799ae1; SCROLLBAR-3DLIGHT-COLOR: #799ae1; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-TRACK-COLOR: #aabfec; SCROLLBAR-DARKSHADOW-COLOR: #799ae1 } </style> <body bgcolor="#D6DFF7" leftmargin="15" rightmargin="15"> <table border="0" cellpadding="0" style="border-collapse: collapse" width="100%" id="table7" height="18"> <tr> <td align="right"> </td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" bgcolor="#1C58C9"> <tr> <td class=td1 height="30" align="center" background="pic/lbg.gif" bgcolor="#1C58C9"><%=strt%></td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#1C58C9" width="100%" bgcolor=#ffffff> <tr> <td width="100%" valign="top"> <%select case action%> <%case"editfl" flid=checknum(request.querystring("flid")) set rs=conn.execute("select top 1 bdinfo from bdinfo where id="&flid&" and followid=0") %><form method="POST" action="adminright1.asp?action=updatefl&flid=<%=flid%>"> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%"> <tr class=td2> <td width="35%"> <p style="margin: 8">分类的 ID:</td> <td width="65%"> <%=flid%></td> </tr> <tr> <td> <p style="margin: 8"><font color="#0466CC"><b>分类的名称:</b></font><br>支持 HTML</td> <td> <input type="text" name="flname" size="46" value="<%=checkform(rs("bdinfo"))%>"></td> </tr> <tr> <td colspan="2" bgcolor="#F4F6FC" align="center" height="35"> <input type="submit" value=" 确 认 修 改 " name="B1"></td> </tr> </table></form> <%set rs=nothing%> <%case"updatefl" dim flid,flname flid=checknum(request.querystring("flid")) flname=Replace(Request.Form("flname"),"'","") if flname="" then call send("·对不起,请正确填写分类名称。<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>") else conn.execute("update bdinfo set bdinfo='"&flname&"' where id="&flid&" and followid=0") call send("编辑分类成功。") application(prefix&"allthebbs")="" end if%> <%case"editbd" bd=checknum(request.querystring("bd")) set rs=conn.execute("select top 1 * from bdinfo where id="&bd&" and followid<>0") bdinfo=rs("bdinfo") bdinfo=split(bdinfo,"|") dim ad ad=rs("ad") ad=split(ad,"|") %> <form method="POST" action="adminright1.asp?action=editbdsave&bd=<%=bd%>"> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%"> <tr class=td2> <td width="25%"> <p style="line-height: 150%; margin: 5">版面 ID:</td> <td width="75%"> <%=bd%></td> </tr> <tr> <td> <p style="line-height: 150%; margin: 5"><font color="#0466CC"><b>论坛名称:</b></font><br>支持HTML</td> <td> <input type="text" name="bdname" size="25" value="<%=checkform(bdinfo(0))%>"></td> </tr> <tr> <td> <p style="line-height: 150%; margin: 5"><font color="#0466CC"><b> 论坛LOGO:</b></font><br>可以不填</td> <td> <input type="text" name="picurl" size="49" value="<%=checkform(bdinfo(2))%>"></td> </tr> <tr> <td valign="top"> <p style="line-height: 150%; margin: 5"><font color="#0466CC"><b>论坛介绍:</b></font></td> <td> <p style="margin: 4"> <textarea rows="4" name="bdinfo" cols="58" style="font-size: 9pt; font-family: 宋体"><%=checkform(bdinfo(1))%></textarea></td> </tr> <tr> <td valign="top"> <p style="line-height: 150%; margin: 5"><font color="#0466CC"><b>版面顶部广告:</b></font></td> <td> <p style="margin: 4"> <textarea rows="4" name="adtop" cols="58" style="font-size: 9pt; font-family: 宋体"><%=checkform(ad(0))%></textarea></td> </tr> <tr> <td valign="top"> <p style="line-height: 150%; margin: 5"><font color="#0466CC"><b>版面底部广告:</b></font></td> <td> <p style="margin: 4"> <textarea rows="4" name="adbottom" cols="58" style="font-size: 9pt; font-family: 宋体"><%=checkform(ad(1))%></textarea></td> </tr> <tr> <td> <p style="line-height: 150%; margin: 5"><font color="#0466CC"><b>属于分类:</b></font></td> <td> <%set rs1=conn.execute("select * from bdinfo where followid=0 order by orders desc,id")%><select size="1" name="followid" style="font-size: 9pt"> <%do while not rs1.eof%><option value="<%=rs1("id")%>" <%if rs1("id")=rs("followid") then%>selected<%end if%>><%=rs1("bdinfo")%></option><% rs1.movenext Loop rs1.Close set rs1=nothing %> </select></td> </tr> <tr> <td valign="top"> <p style="line-height: 150%; margin: 5"><font color="#0466CC"><b>论坛类型:</b></font></td> <td> <p style="MARGIN: 4px"> <input type="radio" CHECKED value="0" name="bbstype" <%if rs("type")=0 then:response.write"checked":end if%>>普通论坛(用户和游客可以自由的进入该类型论坛,·推荐·) </p> <p style="MARGIN: 4px"><input type="radio" value="1" name="bbstype" <%if rs("type")=1 then:response.write"checked":end if%>>会员论坛(只有注册用户才能进入该类型论坛)</p> <p style="MARGIN: 4px"><input type="radio" value="2" name="bbstype" <%if rs("type")=2 then:response.write"checked":end if%>>锁定论坛(会员和游客只能浏览帖子,不能对该论坛的帖子回复等)</p> <p style="MARGIN: 4px"><input type="radio" value="3" name="bbstype" <%if rs("type")=3 then:response.write"checked":end if%>>认证论坛(只有版主认证的注册用户才能进入该类型论坛)</p> <p style="MARGIN: 4px"><input type="radio" value="4" name="bbstype" <%if rs("type")=4 then:response.write"checked":end if%>>VIP论坛(只有vip用户方能进入--版主甚至管理员如非vip也不能进入)</td> </tr> <tr> <td colspan="2" bgcolor="#F4F6FC" align="center" height="35"> <input type="submit" value=" 确 认 添 加 " name="B1"></td> </tr> </table></form> <%set rs=nothing%> <%case"editbdsave" dim bdname,followid,bbstype,picurl,adtop,adbottom,adstr bd=checknum(request.querystring("bd")) bdname=Replace(Request.Form("bdname"),"|","│") picurl=Replace(Request.Form("picurl"),"|","│") bdinfo=Replace(Request.Form("bdinfo"),"|","│") followid=checknum(request.form("followid")) bbstype=checknum(request.form("bbstype")) adtop=Replace(Request.Form("adtop"),"|","│") adbottom=Replace(Request.Form("adbottom"),"|","│") adstr=adtop&"|"&adbottom if bdname="" or bdinfo="" then call send("·请填写完整必填的资料<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>") else bdinfo=bdname&"|"&bdinfo&"|"&picurl&"|" bdinfo=replace(bdinfo,"'","") conn.execute("update [bdinfo] set followid="&followid&",bdinfo='"&bdinfo&"',type="&bbstype&",ad='"&adstr&"' where id="&bd&" and followid<>0") call send("成功编辑版面 "&bdname&" 。") end if application(prefix&"allthebbs")="" %> <%case"upfl" dim maxorders flid=checknum(request.querystring("flid")) maxorders=conn.execute("select top 1 max(orders) from bdinfo where followid=0")(0) maxorders=maxorders+1 conn.execute("update bdinfo set orders="&maxorders&" where id="&flid&" and followid=0") application(prefix&"allthebbs")="" response.redirect "adminright2.asp?action=bdinfo" case"upbd" bd=checknum(request.querystring("bd")) maxorders=conn.execute("select top 1 max(orders) from bdinfo where followid<>0")(0) maxorders=maxorders+1 conn.execute("update bdinfo set orders="&maxorders&" where id="&bd&" and followid<>0") application(prefix&"allthebbs")="" response.redirect "adminright2.asp?action=bdinfo" case"pass" bd=checknum(request.querystring("bd")) set rs=conn.execute("select top 1 passuser from bdinfo where id="&bd&" and followid<>0") %><form method="POST" action="adminright1.asp?action=addpassuser&bd=<%=bd%>"> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%"> <tr> <td width="110%" valign="top"> <p style="line-height: 120%; margin: 5"><font color="#0466CC"><b>版面认证用户:</b></font><br> 该版面为认证版面,请输入能够进入该版面的用户的用户名。<br>各个用户名用<font color="#FF0000"> | </font> 隔开,输入过程中<b><font color="#FF0000">不能按 Enter</font></b>。</td> </tr> <tr> <td width="110%" valign="top"> <p style="margin: 5"> <textarea rows="10" name="passuser" cols="70" style="font-family: 宋体; font-size: 9pt"><%=rs("passuser")%></textarea></td> </tr> <tr> <td width="110%" bgcolor="#F4F6FC" align="center" height="35"> <input type="submit" value=" 确 定 提 交 " name="B1"></td> </tr> </table></form> <%set rs=nothing%> <%case"addpassuser" dim passuser bd=checknum(request.querystring("bd")) passuser=Replace(Request.Form("passuser"),"'","") conn.execute("update bdinfo set passuser='"&passuser&"' where id="&bd&" and followid<>0") call send("添加认证用户成功。") %> <%case"userdel"%><form method="POST" action="adminright1.asp?action=deluser"> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%" bgcolor="#F4F6FC"> <tr class=td1> <td width="100%" colspan="2" height="28" bgcolor="#F4F6FC"> </td> </tr> <tr> <td class=td3 colspan="2">删除用户:</td> </tr> <tr> <td class=td2 width="30%" height="40" bgcolor="#FFFFFF"> 请输入要删除的用户名:</td> <td width="70%" bgcolor="#FFFFFF"> <input type="text" name="name" size="40"></td> </tr> <tr> <td width="30%" height="40" bgcolor="#FFFFFF"> <p style="line-height: 150%; margin: 4"><b><font color="#0466CC">是否永久删除。</font></b><br>这样将删除该用户的所有帖子,<br>选择该操作将不可恢复。</td> <td width="70%" bgcolor="#FFFFFF"> <input type="radio" value="1" name="dely">是 <input type="radio" value="2" name="dely" checked>否</td> </tr> <tr> <td width="100%" height="40" colspan="2" align="center"> <input type="submit" value=" 确 认 删 除 " name="B1"></td> </tr> </table></form><form method="POST" action="adminright1.asp?action=hyuser"><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%" bgcolor="#F4F6FC"> <tr> <td class=td3 colspan=2>还原用户:</td> </tr> <tr> <td class=td2 width="30%" height="40"> 请输入要还原的用户名:</td> <td width="70%"> <input type="text" name="name" size="40"> <input type="submit" value=" 确 认 还 原 " name="B1"></td> </tr> </table></form> <%case"deluser" name=Replace(Request.Form("name"),"'","") dely=checknum(request.form("dely")) if dely=2 then conn.execute("update [user] set del=true where name='"&name&"'") call send("删除用户成功。") application(prefix&"deluser")=application(prefix&"deluser")&"|"&userid&"|" elseif dely=1 then set rs=conn.execute("select top 1 userid from [user] where name='"&name&"'") if rs.eof then call send("·该用户名不存在<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>") else userid=rs(0) usedtable=application(prefix&"usedtable") usedtable=split(usedtable,"|") for i=1 to ubound(usedtable) '执行删除操作 conn.execute("delete*from bbs"&usedtable(i)&" where bid<>0 and id in (select id from [topic] where userid="&userid&" and totable="&usedtable(i)&")") conn.execute("delete*from bbs"&usedtable(i)&" where userid="&userid&"") next conn.execute("delete*from sms where touserid="&userid&" or fromuserid="&userid&"") conn.execute("delete*from vote where id in (select id from [topic] where userid="&userid&")") conn.execute("delete*from topic where userid="&userid&"") conn.execute("delete*from [user] where userid="&userid&"") application(prefix&"deluser")=application(prefix&"deluser")&"|"&userid&"|" call send("删除用户成功。") end if set rs=nothing end if case"hyuser" name=Replace(Request.Form("name"),"'","") set rs1=server.createobject("adodb.recordset") sql="Select top 1 userid,del from [user] where name='"&name&"'" rs1.open sql,conn,1,3 if not rs1.eof then rs1("del")=true rs1.Update application(prefix&"deluser")=replace(application(prefix&"deluser"),"|"&rs1("userid")&"|","") end if rs1.close set rs1=nothing conn.execute("update [user] set del=false where name='"&name&"'") application(prefix&"deluser")=application(prefix&"deluser")&"|"&userid&"|" call send("还原用户成功。") %><%case"changepwd"%> <form method="POST" action="adminright1.asp?action=newpwd"> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%"> <tr class=td2> <td width="25%"> <p style="margin: 8">用户名:</td> <td width="75%"> <%=flid%><input type="text" name="name" size="40"></td> </tr> <tr> <td> <p style="margin: 8"><font color="#0466CC"><b>新密码:</b></font></td> <td> <input type="password" name="pwd" size="40"></td> </tr> <tr> <td colspan="2" bgcolor="#F4F6FC" align="center" height="35"> <input type="submit" value=" 确 认 修 改 " name="B1"></td> </tr> </table></form> <%case"newpwd" dim pwd,newpwd name=Replace(Request.Form("name"),"'","") pwd=Replace(Request.Form("pwd"),"'","") if name="" or pwd="" then call send("·请填写完整必填的资料<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>") else newpwd=md5(pwd) set rs=server.createobject("adodb.recordset") sql="Select top 1 name,password from [user] where name='"&name&"'" rs.open sql,conn,1,3 if rs.eof then call send("·论坛不存在该用户<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>") else rs("password")=newpwd conn.execute("update [admin] set [password]='"&newpwd&"' where name='"&name&"'") rs.Update call send("修改密码成功。"&name&" 的新密码为 "&pwd&"") end if rs.close set rs=nothing end if %> <%case"userset"%><form method="POST" action="adminright1.asp?action=setuserok"> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%"> <tr> <td width="40%"> <p style="line-height: 120%; margin: 5">请输入要进行特殊设置的用户名:</td> <td width="60%"> <p style="line-height: 120%; margin: 5"> <input type="text" name="name" size="40"></td> </tr> <tr> <td> <p style="line-height: 120%; margin: 5">是否禁止该用户发帖:</td> <td> <p style="line-height: 120%; margin: 5"> <input type="radio" value="1" name="addtopic">是 <input type="radio" value="2" name="addtopic" checked>否</td> </tr> <tr> <td> <p style="line-height: 120%; margin: 5">是否屏蔽该用户发的帖子:</td> <td> <p style="line-height: 120%; margin: 5"> <input type="radio" name="showtopic" value="1">是 <input type="radio" name="showtopic" value="2" checked>否</td> </tr> <tr> <td colspan="2" bgcolor="#F4F6FC" align="center" height="35"> <p style="line-height: 120%; margin: 5"> <input type="submit" value=" 确 认 修 改 " name="B1"></td> </tr> </table></form> <%case"setuserok" dim utype,addtopic,showtopic name=Replace(Request.Form("name"),"'","") addtopic=checknum(request.form("addtopic")) showtopic=checknum(request.form("showtopic")) if addtopic=1 and showtopic=1 then utype=3 if addtopic=1 and showtopic=2 then utype=1 if addtopic=2 and showtopic=1 then utype=2 if addtopic=2 and showtopic=2 then utype=0 if name="" then call send("·请填写完整必填的资料<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>") else set rs1=server.createobject("adodb.recordset") sql="Select top 1 type from [user] where name='"&name&"'" rs1.open sql,conn,1,3 if rs1.eof then call send("·论坛不存在该用户<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>") else rs1("type")=utype rs1.Update call send("成功修改用户特殊设置。") end if rs1.close set rs1=nothing end if %> <%case"vip"%> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%"> <tr class=td2 > <td colspan="2" height="40" valign="top" bgcolor="#FFFFFF"> <p style="line-height: 150%; margin: 5">当前论坛VIP用户:<br> <%set rs=conn.execute("select name from [user] where grade=13") i=0 do while not rs.eof response.write checktitle(rs("name"))&" " i=i+1 if i/10=i\10 then response.write"<br>" end if rs.movenext loop set rs=nothing%></td> </tr><form method="POST" action="adminright1.asp?action=addvip"> <tr> <td class=td3 colspan=2>添加VIP用户:</td> </tr><tr> <td class=td2 width="25%" height="35"> <p style="margin: 5">请输入用户名:</td> <td width="75%"> <input type="text" name="name" size="40"> <input type="submit" value=" 确 认 添 加 " name="B2"></td> </tr></form><form method="POST" action="adminright1.asp?action=delvip"> <tr> <td class=td3 colspan=2>删除VIP用户:</td> </tr> <tr> <td class=td2 height="35"> <p style="margin: 5">请输入用户名:</td> <td> <input type="text" name="name" size="40"> <input type="submit" value=" 确 认 删 除 " name="B1"></td> </tr></form> </table> <% case"addvip" name=Replace(Request.Form("name"),"'","") set rs=server.createobject("adodb.recordset") sql="Select top 1 grade from [user] where name='"&name&"'" rs.open sql,conn,1,3 if rs("grade")>13 then call send("该用户已经是版主或者管理员,不能再设定为VIP用户。") else rs("grade")=13 rs.Update call send("添加VIP用户成功。") end if rs.close set rs=nothing case"delvip" name=Replace(Request.Form("name"),"'","") set rs=server.createobject("adodb.recordset") sql="Select top 1 grade from [user] where name='"&name&"'" rs.open sql,conn,1,3 if rs("grade")>13 then call send("该用户是版主或者管理员,不能删除VIP权限。") else rs("grade")=0 rs.Update call send("删除VIP用户成功。") end if rs.close set rs=nothing %> <%case"deltopic"%><br> <form action="adminright1.asp?action=delday" method="POST"> <table style="BORDER-COLLAPSE: collapse" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td class=td3 colspan=2>删除指定日期内的帖子</td> </tr> <tr> <td class=td2 width="30%" height="28"> <p style="MARGIN: 5px">删除多少天前的帖子:( 填数字 ) </p> </td> <td width="70%"> <input size="20" name="daynum"></td> </tr> <tr> <td class=td2 height="28"> <p style="margin: 5">删除帖子所在的论坛:( 请选择 ) </td> <td><%bdlist("bd")%></td> </tr> <tr> <td width="100%" bgcolor="#F4F6FC" colspan="2" align="center" height="35"> <input type="submit" value=" 确 认 删 除 " name="B1"></td> </tr> </table> </form> <form action="adminright1.asp?action=deldaynore" method="POST"> <table style="BORDER-COLLAPSE: collapse" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td class=td3 colspan=2>删除指定日期内没有回复的主题</td> </tr> <tr> <td class=td2 width="30%" height="28"> <p style="MARGIN: 5px">删除多少天前的帖子:( 填数字 ) </p> </td> <td width="70%"> <input size="20" name="daynum"></td> </tr> <tr> <td class=td2 height="28"> <p style="margin: 5">删除帖子所在的论坛:( 请选择 ) </td> <td><%bdlist("bd")%></td> </tr> <tr> <td width="100%" bgcolor="#F4F6FC" colspan="2" align="center" height="35"> <input type="submit" value=" 确 认 删 除 " name="B1"></td> </tr> </table> </form><form action="adminright1.asp?action=delusertopic" method="POST"> <table style="BORDER-COLLAPSE: collapse" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td class=td3 colspan=2>删除指定用户的所有帖子</td> </tr> <tr> <td class=td2 width="30%" height="28"> <p style="MARGIN: 5px">删除指定用户的帖子:( 用户名 )</p> </td> <td width="70%"> <input size="20" name="name"></td> </tr> <tr> <td class=td2 height="28"> <p style="margin: 5">删除帖子所在的论坛:( 请选择 ) </td> <td><%bdlist("bd")%></td> </tr> <tr> <td width="100%" bgcolor="#F4F6FC" colspan="2" align="center" height="35"> <input type="submit" value=" 确 认 删 除 " name="B1"></td> </tr> </table> </form> <%case"delday" bd=checknum(request.form("bd")) daynum=checknum(request.form("daynum")) usedtable=application(prefix&"usedtable") usedtable=split(usedtable,"|") for i=1 to ubound(usedtable) if bd=0 then conn.execute("delete*from bbs"&i&" where bid in(select id from topic where edittime<now()+"×et&"/24-"&daynum&" and totable="&i&")") conn.execute("delete*from bbs"&i&" where edittime<now()+"×et&"/24-"&daynum&"") else conn.execute("delete*from bbs"&i&" where bd="&bd&" and bid in(select id from topic where edittime<now()+"×et&"/24-"&daynum&" and bd="&bd&" and totable="&i&")") conn.execute("delete*from bbs"&i&" where edittime<now()+"×et&"/24-"&daynum&" and bd="&bd&"") end if next if bd=0 then conn.execute("delete*from topic where edittime<now()+"×et&"/24-"&daynum&"") else conn.execute("delete*from topic where edittime<now()+"×et&"/24-"&daynum&" and bd="&bd&"") end if call send("删除成功,建议您压缩数据库。") case"deldaynore" bd=checknum(request.form("bd")) daynum=checknum(request.form("daynum")) usedtable=application(prefix&"usedtable") usedtable=split(usedtable,"|") for i=1 to ubound(usedtable) if bd=0 then conn.execute("delete*from bbs"&i&" where id in(select id from topic where edittime<now()+"×et&"/24-"&daynum&" and renum=0 and totable="&i&")") else conn.execute("delete*from bbs"&i&" where id in(select id from topic where edittime<now()+"×et&"/24-"&daynum&" and renum=0 and totable="&i&" and bd="&bd&")") end if next if bd=0 then conn.execute("delete*from topic where edittime<now()+"×et&"/24-"&daynum&" and renum=0") else conn.execute("delete*from topic where edittime<now()+"×et&"/24-"&daynum&" and bd="&bd&" and renum=0") end if call send("删除成功,建议您压缩数据库。") case"delusertopic" dim userid bd=checknum(request.form("bd")) name=Replace(Request.Form("name"),"'","") set rs=conn.execute("select top 1 userid from [user] where name='"&name&"'") if rs.eof then call send("·论坛不存在该用户<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>") else userid=rs(0) usedtable=application(prefix&"usedtable") usedtable=split(usedtable,"|") for i=1 to ubound(usedtable) if bd=0 then conn.execute("delete*from bbs"&i&" where userid="&userid&"") else conn.execute("delete*from bbs"&i&" where userid="&userid&" and bd="&bd&"") end if next if bd=0 then conn.execute("delete*from topic where userid="&userid&"") else conn.execute("delete*from topic where userid="&userid&" and bd="&bd&"") end if call send("删除成功,建议您压缩数据库。") end if %> <%case"movetopic"%><br><form method="POST" action="adminright1.asp?action=moveday"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td class=td3 colspan=2>按指定天数移动帖子</td> </tr> <tr> <td class=td2 width="30%"> <p style="margin: 5">移动多少天前的帖子:( 填数字 )</td> <td width="70%"> <input size="20" name="daynum"></td> </tr> <tr> <td class=td2 > <p style="margin: 5">帖子原来所在的论坛:( 请选择 )</td> <td><%bdlist("oldbd")%></td> </tr> <tr> <td class=td2 > <p style="margin: 5">帖子要移动到的论坛:( 请选择 )</td> <td><%bdlist("newbd")%></td> </tr> <tr> <td colspan="2" bgcolor="#F4F6FC" align="center" height="35"> <input type="submit" value=" 确 认 移 动 " name="B1"></td> </tr> </table></form> <form method="POST" action="adminright1.asp?action=moveuser"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td class=td3 colspan=2>按指定用户移动帖子</td> </tr> <tr> <td class=td2 width="30%"> <p style="margin: 5">移动指定用户的帖子:( 用户名 )</td> <td width="70%"> <input size="20" name="name"></td> </tr> <tr> <td class=td2 > <p style="margin: 5">帖子原来所在的论坛:( 请选择 )</td> <td><%bdlist("oldbd")%></td> </tr> <tr> <td class=td2 > <p style="margin: 5">帖子要移动到的论坛:( 请选择 )</td> <td><%bdlist("newbd")%></td> </tr> <tr> <td colspan="2" bgcolor="#F4F6FC" align="center" height="35"> <input type="submit" value=" 确 认 移 动 " name="B1"></td> </tr> </table></form> <%case"moveday" dim oldbd,newbd oldbd=checknum(request.form("oldbd")) newbd=checknum(request.form("newbd")) if newbd=0 then call send("·请选择要移动到的版面<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>") else daynum=checknum(request.form("daynum")) usedtable=application(prefix&"usedtable") usedtable=split(usedtable,"|") for i=1 to ubound(usedtable) if oldbd=0 then conn.execute("update bbs"&i&" set bd="&newbd&" where edittime<now()+"×et&"/24-"&daynum&"") else conn.execute("update bbs"&i&" set bd="&newbd&" where edittime<now()+"×et&"/24-"&daynum&" and bd="&oldbd&"") end if next if oldbd=0 then conn.execute("update topic set bd="&newbd&" where edittime<now()+"×et&"/24-"&daynum&"") else conn.execute("update topic set bd="&newbd&" where edittime<now()+"×et&"/24-"&daynum&" and bd="&oldbd&"") end if call send("移动帖子成功。") end if case"moveuser" oldbd=checknum(request.form("oldbd")) newbd=checknum(request.form("newbd")) name=Replace(Request.Form("name"),"'","") if newbd=0 then call send("·请选择要移动到的版面<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>") else set rs=conn.execute("select top 1 userid from [user] where name='"&name&"'") if rs.eof then call send("·论坛不存在该用户<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>") else userid=rs(0) usedtable=application(prefix&"usedtable") usedtable=split(usedtable,"|") for i=1 to ubound(usedtable) if oldbd=0 then conn.execute("update bbs"&i&" set bd="&newbd&" where userid="&userid&"") else conn.execute("update bbs"&i&" set bd="&newbd&" where userid="&userid&" and bd="&oldbd&"") end if next if oldbd=0 then conn.execute("update topic set bd="&newbd&" where userid="&userid&"") else conn.execute("update topic set bd="&newbd&" where userid="&userid&" and bd="&oldbd&"") end if call send("移动帖子成功。") end if end if case"adminpwd" %> <form method="POST" action="adminright1.asp?action=editadminpwd"> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%"> <tr class=td2> <td width="25%"> <p style="margin: 8">管 理 员:</td> <td width="75%"> <%=flid%><input type="text" name="name" size="40"></td> </tr> <tr> <td> <p style="margin: 8"><font color="#0466CC"><b>后台密码:</b></font></td> <td> <input type="password" name="pwd" size="40"></td> </tr> <tr> <td colspan="2" bgcolor="#F4F6FC" align="center" height="35"> <input type="submit" value=" 确 认 修 改 " name="B1"></td> </tr> </table></form> <%case"editadminpwd" name=Replace(Request.Form("name"),"'","") pwd=Replace(Request.Form("pwd"),"'","") newpwd=md5(pwd) set rs1=server.createobject("adodb.recordset") sql="Select * from [admin] where name='"&name&"'" rs1.open sql,conn,1,3 if rs1.eof then call send("不存在该管理员。") else rs1("password")=newpwd rs1.Update call send("修改后台管理密码成功。") end if rs1.close set rs1=nothing%> <%end select%></td> </tr> </table>